// 新会计科目表
const {DataTypes, db } = require("../db");
db.define('subject', {
id: {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true,comment:'表自增ID'},
tenantId:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
code:{type: DataTypes.STRING(255),allowNull:false,comment:''}, 
direct:{type: DataTypes.STRING(24),allowNull:false,comment:'方向 借|贷'}, 
pid:{type: DataTypes.INTEGER,defaultValue:0,comment:''}, 
pidCode:{type: DataTypes.STRING(64),defaultValue:(''),comment:''}, 
pinYin:{type: DataTypes.STRING(32),defaultValue:(''),comment:''}, 
remark:{type: DataTypes.STRING(255),defaultValue:(''),comment:''}, 
kind:{type: DataTypes.STRING(24),defaultValue:('自定科目'),comment:'类型 | 系统科目|自定科目'}, 
fl:{type: DataTypes.STRING(255),comment:'分类| 资产|负债|权益|成本|损益'}, 
bak3:{type: DataTypes.STRING(255),comment:''}, 
bak4:{type: DataTypes.STRING(255),comment:''}, 
state:{type: DataTypes.STRING(12),defaultValue:('启用'),comment:'启用|停用'}, 

}, {
    tableName: 'subject',
    timestamps: false,
    comment: '新会计科目表',
    
});